﻿<Window x:Class="DocumentManagement.Views.CreateDocumentINN"
        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
        xmlns:vm="clr-namespace:DocumentManagement.ViewsModels"
        Title="CreateDocumentINN" Height="1500" Width="825" Loaded="Window_Loaded" Background="White" xmlns:my="clr-namespace:DocumentManagement.Converters" WindowStartupLocation="Manual" ResizeMode="NoResize">
    
    <Window.Resources>
        <vm:CreateDocumentINNViewsModel x:Key="createDocumentINNViewsModel"/>
        <my:DateConverter x:Key="dateConverter" />
    </Window.Resources>

    <Grid Margin="10,10,-10,-10" Name="grid1" Width="792">
            <ScrollViewer VerticalScrollBarVisibility="Auto" Margin="0,32,0,0">
            <Grid  Margin="0,38,0,0" Name="grid2" DataContext="{Binding Source={StaticResource createDocumentINNViewsModel}}" Height="1388" Width="777">
                    <StackPanel Name="stackPanel1">
                        <StackPanel Name="stackPanel3" Orientation="Horizontal">
                            <Image Height="112" Margin="120,0,0,0" Name="image1" Source="/DocumentManagement;component/Images/pic.jpg" Stretch="Fill" Width="117" />
                            <TextBlock FontFamily="TH SarabunPSK" FontSize="28" FontWeight="Bold" Height="36" Margin="140,0,0,0" Name="textBlock1" Text="บันทึกข้อความ" />
                        </StackPanel>
                    <StackPanel Name="stackPanel55" Orientation="Horizontal">
                        <TextBlock FontFamily="TH SarabunPSK" FontSize="20" FontWeight="Bold" Margin="120,0,0,0" Text="ชั้นความเร็ว  " />
                        <GroupBox FontSize="16" Height="31" Name="groupBox3" Width="299">
                            <Grid Height="26">
                                <RadioButton Content="ปกติ" FontFamily="TH SarabunPSK" FontSize="20" Height="24" HorizontalAlignment="Left" IsChecked="{Binding Path=MySpeed1, Mode=TwoWay}" IsEnabled="True" IsTabStop="False" Margin="6,2,0,0" Name="SpeedRadio1" TabIndex="1" VerticalAlignment="Top" />
                                <RadioButton Content="ด่วน" FontFamily="TH SarabunPSK" FontSize="20" Height="22" HorizontalAlignment="Left" IsChecked="{Binding Path=MySpeed2, Mode=TwoWay}" Margin="59,2,0,0" Name="SpeedRadio2" TabIndex="2" VerticalAlignment="Top" IsTabStop="False" />
                                <RadioButton Content="ด่วนมาก" FontFamily="TH SarabunPSK" FontSize="20" Height="22" HorizontalAlignment="Left" IsChecked="{Binding Path=MySpeed3, Mode=TwoWay}" Margin="107,2,0,0" Name="SpeedRadio3" TabIndex="3" VerticalAlignment="Top" IsTabStop="False" />
                                <RadioButton Content="ด่วนที่สุด" FontFamily="TH SarabunPSK" FontSize="20" Height="29" HorizontalAlignment="Left" IsChecked="{Binding Path=MySpeed4, Mode=TwoWay}" Margin="179,2,0,0" Name="SpeedRadio4" TabIndex="4" VerticalAlignment="Top" IsTabStop="False" />
                            </Grid>
                        </GroupBox>
                    </StackPanel>
                    <StackPanel Name="stackPanel5" Orientation="Horizontal">
                            <TextBlock FontFamily="TH SarabunPSK" FontSize="20" FontWeight="Bold" Margin="120,0,0,0" Text="ส่วนราชการ  " />
                        <TextBox  FontFamily="TH SarabunPSK" FontSize="20" TextWrapping="Wrap"  VerticalAlignment="Stretch" AcceptsReturn="True" AcceptsTab="False" BorderThickness="0" Width="541" Name="NameInstitutionTextBox" Text="{Binding Path=MyCreateSend.NameInstitution, Mode=TwoWay}" TabIndex="1" />
                    </StackPanel>
                        <StackPanel Margin="0" Name="stackPanel6" Orientation="Horizontal">
                            <TextBlock FontFamily="TH SarabunPSK" FontSize="20" FontWeight="Bold" Margin="120,0,0,0" Text="ที่  " />
                        <TextBox  FontFamily="TH SarabunPSK" FontSize="20" TextWrapping="Wrap"  VerticalAlignment="Stretch" AcceptsReturn="True" AcceptsTab="True" BorderThickness="0" Width="239" Text="{Binding Path=MyCreateSend.CreateSendCode, Mode=TwoWay}" Name="CreateSendCodeTextBox" IsEnabled="False" />
                        <TextBlock FontFamily="TH SarabunPSK" FontSize="20" FontWeight="Bold"  Text="วันที่  " />
                        <DatePicker FontFamily="Tahoma" FontSize="14" Height="25" Name="CreateSendDatePicker" Width="115" SelectedDate="{Binding Path=MyCreateSend.CreateSendDate, Mode=TwoWay}" />
                        <TextBlock Name="DateTextBlock" Text="{Binding Path=MyCreateSend.CreateSendDate, Mode=TwoWay, Converter={StaticResource dateConverter}}" FontFamily="TH SarabunPSK" FontSize="20" />
                    </StackPanel>
                        <StackPanel Margin="0,10,0,0" Name="stackPanel7" Orientation="Horizontal">
                        <TextBlock FontFamily="TH SarabunPSK" FontSize="20" FontWeight="Bold" Margin="120,0,0,0" Text="เรื่อง  " />
                        <TextBox  FontFamily="TH SarabunPSK" FontSize="20" TextWrapping="Wrap"  VerticalAlignment="Stretch" AcceptsReturn="True" AcceptsTab="False" BorderThickness="0" Width="585" Text="{Binding Path=MyCreateSend.Title, Mode=TwoWay}" Name="TitleTextBox" TabIndex="2" />
                    </StackPanel>
                        <StackPanel Margin="0,10,0,0" Name="stackPanel8" Orientation="Horizontal">
                        <TextBlock FontFamily="TH SarabunPSK" FontSize="20" FontWeight="Bold" Margin="120,0,0,0" Text="เรียน  " />
                        <TextBox  FontFamily="TH SarabunPSK" FontSize="20" TextWrapping="Wrap"  VerticalAlignment="Stretch" AcceptsReturn="True" AcceptsTab="False" BorderThickness="0" Width="585" Text="{Binding Path=MyCreateSend.ToPosition, Mode=TwoWay}" Name="ToPositionTextBox" TabIndex="3" />
                    </StackPanel>
                        <StackPanel Margin="0,10,0,0" Name="stackPanel11" Orientation="Horizontal">
                        <TextBlock FontFamily="TH SarabunPSK" FontSize="20" FontWeight="Normal" Margin="120,0,0,0" Text="ถึงหน่วยงาน  " />
                        <ComboBox DisplayMemberPath="ThaiName" FontFamily="TH SarabunPSK" FontSize="20" Height="28" ItemsSource="{Binding Path=EntityModels.Divisions}" Name="ToDivisionComboBox" SelectedValue="{Binding Path=MyCreateSend.ToDivisionID}" SelectedValuePath="DivisionID" TabIndex="4" Width="179" />
                    </StackPanel>
                        <StackPanel Margin="0,10,0,0" Name="stackPanel12" Orientation="Vertical">
                            <TextBox AcceptsReturn="True" AcceptsTab="True" BorderThickness="0" FontFamily="TH SarabunPSK" FontSize="20" Margin="120,0,40,0"  TextWrapping="Wrap" VerticalAlignment="Stretch" Text="{Binding Path=MyCreateSend.Paragraph1, Mode=TwoWay}" Name="Paragraph1TextBox" TabIndex="5" Width="624" />
                        </StackPanel>
                        <!--<StackPanel Margin="0,10,0,0" Name="stackPanel13" Orientation="Vertical">
                            <TextBox AcceptsReturn="True" AcceptsTab="True" BorderThickness="0" FontFamily="TH SarabunPSK" FontSize="20" Margin="120,0,40,0" Text="{Binding Path=Paragraph3, Mode=TwoWay}" TextWrapping="Wrap" VerticalAlignment="Stretch" />
                        </StackPanel>-->
                        <StackPanel Margin="0,20,0,0" Name="stackPanel14" Orientation="Horizontal">
                        <TextBlock Name="PostScriptTextBlock" FontFamily="TH SarabunPSK" FontSize="20" FontWeight="Normal" Margin="200,0,0,0" Text="คำลงท้าย  " Width="75" />
                        <TextBox  FontFamily="TH SarabunPSK" FontSize="20" TextWrapping="Wrap" AcceptsReturn="True" AcceptsTab="False" BorderThickness="0" Width="379" TextAlignment="Center" Text="{Binding Path=MyCreateSend.PostScript, Mode=TwoWay}" Name="PostScriptTextBox" TabIndex="6" />
                        </StackPanel>
                        <StackPanel Margin="0,60,0,0" Name="stackPanel15" Orientation="Horizontal">
                        <TextBlock Name="EndorserTextBlock" FontFamily="TH SarabunPSK" FontSize="20" FontWeight="Normal" Margin="200,0,0,0" Text="ผู้ลงนาม  " Width="75" />
                        <TextBox  FontFamily="TH SarabunPSK" FontSize="20" TextWrapping="Wrap" AcceptsReturn="True" AcceptsTab="False" BorderThickness="0" Width="379" TextAlignment="Center" Text="{Binding Path=MyCreateSend.Endorser, Mode=TwoWay}" Name="EndorserTextBox" TabIndex="7" />
                    </StackPanel>
                        <StackPanel Name="stackPanel16" Orientation="Horizontal">
                        <TextBlock Name="PositionTextBlock" FontFamily="TH SarabunPSK" FontSize="20" FontWeight="Normal" Margin="200,0,0,0" Text="ตำแหน่งงาน  " Width="75" />
                        <TextBox  FontFamily="TH SarabunPSK" FontSize="20" TextWrapping="Wrap" AcceptsReturn="True" AcceptsTab="False" BorderThickness="0" Width="379" TextAlignment="Center" Text="{Binding Path=MyCreateSend.Position, Mode=TwoWay}" Name="PositionTextBox" TabIndex="8" />
                    </StackPanel>
                    <StackPanel Name="stackPanel17" Orientation="Horizontal" Margin="0,50,0,0">
                        <TextBlock FontFamily="TH SarabunPSK" FontSize="20" FontWeight="Normal" Margin="120,0,0,0" Text="หน่วยงานเจ้าของเรื่อง  " Width="123" />
                        <ComboBox DisplayMemberPath="ThaiName" FontFamily="TH SarabunPSK" FontSize="20" Height="29" ItemsSource="{Binding Path=EntityModels.Divisions}" Name="FromDivisionComboBox" SelectedValue="{Binding Path=MyCreateSend.FromDivisionID}" SelectedValuePath="DivisionID" TabIndex="9" Width="179" />
                        <!--<TextBlock Text="{Binding Path=MyCreateSend.Division_FromDivision.ThaiName, Mode=TwoWay}" FontFamily="TH SarabunPSK" FontSize="20"  />-->
                    </StackPanel>
                </StackPanel>
                </Grid>
            </ScrollViewer>
        <StackPanel Height="34" HorizontalAlignment="Left" Name="stackPanel2" VerticalAlignment="Top" Width="791" Orientation="Horizontal">
            <Button Content="บันทึก" Height="29" Name="SaveButton" Width="75" Margin="250,0,0,0" FontFamily="TH SarabunPSK" FontSize="20" Click="SaveButton_Click" TabIndex="10" />
            <Button Content="พิมพ์" FontFamily="TH SarabunPSK" FontSize="20" Height="29" Name="PrintButton" TabIndex="10" Width="75" Margin="20,0,0,0" Click="PrintButton_Click" />
            <Button Content="ตัวอย่างก่อนพิมพ์" Height="29" Name="PrintPreviewButton" Width="102" Margin="20,0,0,0" FontFamily="TH SarabunPSK" FontSize="20" Click="PrintPreviewButton_Click" TabIndex="11" />
            <Button Content="ยกเลิก" Height="29" Name="CancelButton" Width="75" Margin="20,0,0,0" FontFamily="TH SarabunPSK" FontSize="20" Click="CancelButton_Click" TabIndex="12" />
        </StackPanel>
    </Grid>
   
</Window>
